import { createApp } from 'vue'
import App from './App.vue'
// 路由
import router from './router'
// 全局样式
import '@/style/main.scss'
// ui组件库
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 仓库
import { createPinia } from 'pinia'
// 持久化
import piniaPersist from 'pinia-plugin-persist'
const pinia = createPinia()
pinia.use(piniaPersist);//pinia数据持久化
// createApp(App).mount('#app')
const app = createApp(App)

app.use(pinia)
app.use(router)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus, {
    locale: zhCn,
})

app.mount('#app')
